<template>
	<view class="content">
		<!-- status -->
		<view class="status"></view>
		<!-- 头部 -->
		<view class="detail-nav">
			<text class="nav-icon cuIcon-back" @tap="goBack()"></text>
			<view class="detail-name">
				{{title}}
			</view>
		</view>
		<!-- 播放图 -->
		<view class="detail-player">
			<view 
			class="player"
			:style="'background-image: url('+ img +');'"
			style="background-repeat: no-repeat;background-size: 100% 100%;">
				<text class="player-icon cuIcon-playfill" @tap="goPlayer()"></text>
			</view>
		</view>
		<!-- 电影详情 -->
		<view class="movie-detail">
			<view class="movie-name">
				{{title}}
			</view>
			<text class="movie-detail-icon" :class="ifShowMsg?'cuIcon-fold':'cuIcon-unfold'" @tap="showMsg()"></text>
		</view>
		<view class="detail-msg" v-show="ifShowMsg">
			<view class="movie-actor">
				主演: {{content}}
			</view>
			<view class="movie-msg">
				电影详情: 暂无
			</view>
		</view>
		
		<!-- 选集 -->
		<view class="source-title">
			选集
		</view>
		<view class="movie-list">
			<view class="list selected" >
				1
			</view>
		</view>
		<!-- 评论 -->
		<view class="comment">
			评论
		</view>
		<view class="comment-list">
			<view class="comments">
				太好看了吧!!!
			</view>
			<view class="comments">
				太好看了吧!!!
			</view>
			<view class="comments">
				太好看了吧!!!
			</view>
		</view>
		<view class="last">
			没有更多啦&nbsp;~
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				
				title:'',
				img: '',
				href: '',
				content: '',
				ifShowMsg: false,
				selected_source: 0,
			}
		},
		onLoad(opt) {
			uni.showLoading({
				title: '加载数据中'
			})
			this.title = opt.title;
			this.img = opt.img;
			this.href = (opt.href);
			this.content = opt.content;
			uni.setNavigationBarTitle({
			    title: this.title
			});
			uni.hideLoading();
		},
		methods: {
			goBack(){
				history.back();
			},
			showMsg(){
				this.ifShowMsg = !this.ifShowMsg;
			},
			
			goPlayer(){
				uni.navigateTo({
					url: '../player/player?title='+ this.title +'&href='+ encodeURIComponent(this.href)
				})
			}
		}
	}
</script>

<style>
	@import url("./index.css");
</style>
